<?php
namespace common\models;

use Yii;

/**
 * This is the model class for table "game_with_type".
 *
 * @property string $id
 * @property string $game_id
 * @property string $game_name
 * @property string $type_id
 * @property string $type_name
 */
class GameWithType extends \yii\db\ActiveRecord
{

    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'game_with_type';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [
                [
                    'game_id',
                    'type_id'
                ],
                'integer'
            ],
            [
                [
                    'game_name',
                    'type_name'
                ],
                'required'
            ],
            [
                [
                    'type_name'
                ],
                'string',
                'max' => 100
            ]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'game_id' => 'Game ID',
            'game_name' => 'Game Name',
            'type_id' => 'Type ID',
            'type_name' => 'Type Name'
        ];
    }
}
